// Package day_02_mid_sort merge_sort_pre
// @Title day_02_mid_sort
// @Description
// @Author  == 琳琳也叫王木木 ==  2021/9/4 17:20
// @Create  2021/9/4 17:20
package day_02_mid_sort

// 用递归的方法求一个数组的最大值

func RecursionFindMinData(nums []int, L, R int) int {
	if L == R {
		return nums[L]
	}
	mid := L + (R-L)>>1
	leftMax := RecursionFindMinData(nums, L, mid)
	rightMax := RecursionFindMinData(nums, mid+1, R)
	if leftMax > rightMax {
		return leftMax
	}
	return rightMax
}
